www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminPicsLunBo\admin_news.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>





<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->



<!--#include file="inc_ziduan.asp"-->

<SCRIPT LANGUAGE="JavaScript">
<!--
function alertreadme(str,url){
{if(confirm(str)){
location.href=url;
return true;
}return false;}
}
//-->
</SCRIPT>







<script language=javascript>





function AJAXDelnews(tid){



if(!confirm("确认删除?")){
return false;
}


AJAXshowWoking("正在删除,请稍后...");


var a=AJAXcreateXMLHttp();
a.open("post","admin_newsDel.asp?tid="+tid,true)

a.onreadystatechange=function(){
if (a.readyState==4)
{

AJAXcloseWoking();

if(a.responseText=="nono")
{
alert("最后一张图片无法删除,请直接修改最后一张图片");
}
else

{
//if(a.responseText=="xmlok")
//{
alert("删除成功");
window.location.reload(); 

//}
}

}
}

a.send(null);


}

</SCRIPT>


<br><br><br>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" style="word-break:break-all" bgcolor=#e0e0e0 >
  <tr align="center">
    <th height="26" colspan="3">管理 图片轮播器的图片</th>
  </tr>
  <tr align="center" bgcolor="#DEDBEF">

    <td width="14%" height="25" bgcolor="#D6DFF7"><strong>id</strong></td>

    <td width="17%" height="25" bgcolor="#D6DFF7"><strong>名称</strong></td>

    <td width="35%" height="25" bgcolor="#D6DFF7"><strong>图片</strong></td>





    <td width="34%" bgcolor="#D6DFF7"><strong>操作</strong></td>
  </tr>
  <%
	CurrentPage=replacebadchar(request("page"))
	if CurrentPage="" then
	CurrentPage=1
	else if not IsNumeric(CurrentPage) then
	CurrentPage=1
	else if int(CurrentPage)<=0 then
	CurrentPage=1
	else
 	CurrentPage=replacebadchar(request("page"))
 	end if
	end if
	end if
	strFileName="admin_news.asp"
	maxperpage=15
	openconn()
		 set rs=server.CreateObject("adodb.recordset")
		 rs.open"select * from "&aaaa&" order by id desc",conn,1,1
		 if not rs.eof then
		rs.pagesize=MaxPerpage
		totalnumber=rs.recordcount
		if totalnumber mod maxperpage=0 then
    	MaxPage= totalnumber \ MaxPerpage
  	else
    	MaxPage= totalnumber \ MaxPerpage+1
  	end if
		if int(CurrentPage)>int(MaxPage) then
		CurrentPage=MaxPage
		else
		CurrentPage=CurrentPage
		end if
		Rs.absolutepage=CurrentPage
		for ni=1 to MaxPerpage
		if rs.eof then exit for
  %>
  <tr onmouseover="this.style.backgroundColor='#F3F3FA';this.style.color='red'" onmouseout="this.style.backgroundColor='';this.style.color=''" align="center">
    

 <td height="25" bgcolor="#D6DFF7"><%=rs("id")%></td>
<td height="25" bgcolor="#D6DFF7"><%=rs("title")%></td>



	<td height="25" bgcolor="#D6DFF7">

<% if rs("smallpic")<>"" then %>

<img src="<%=rs("smallpic")%>" width=139 height=58 border=0>

<%else%>

无图
<%end if%>

</td>




    <td bgcolor="#D6DFF7"><a href="admin_newsEdit.asp?id=<%=rs("id")%>">修改</a>&nbsp;&nbsp;&nbsp;<a href="#" onClick="AJAXDelnews(<%=rs("id")%>);">删除</a></td>
  </tr>
  <%
  rs.movenext
		  next
		  else%>
		 <tr>
        <td height="25" colspan="5" align="center" bgcolor="#D6DFF7">还没有</td>
      </tr>
		  <%end if%>
		          <tr>
        <td height="35" colspan="5" align="center" bgcolor="#D6DFF7" class="showPage"><%call showpage(strFileName,totalnumber,MaxPerPage,flase,true,"条",CurrentPage)%></td>
      </tr>
</table>

<%
rs.close
set rs=nothing
%>